'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  // 
  const { router, controller, middleware } = app;
  router.get('/', controller.home.index);
  router.post('/api/login', controller.login.login);
  router.post('/api/resolve', controller.login.resolve);
  router.get('/api/mock',middleware.auth(), controller.home.mock);
  router.get('/api/lists',  controller.home.getlist);
  router.post('/api/search', controller.home.serect)
  router.get('/api/list', controller.home.det);
  router.post('/api/detail', controller.home.detail);
  router.get('/api/mockdata', controller.home.mockdata);
  router.get('/api/getlist', controller.home.list);
  router.post('/api/area', controller.home.area);
  router.post('/api/area2', controller.home.area2);
  router.post('/api/area3', controller.home.area3);
};
